package com.yonyou.lexue.lexuemgr.service.trainingplan;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.yonyou.lexue.lexuemgr.entity.TrainingPlan;
import com.yonyou.lexue.lexuemgr.repository.TrainingPlanDao;

@Component
@Transactional
public class TrainingPlanService {

	@Autowired
	private TrainingPlanDao trainingPlanDao;
	
	public void saveTrainingPlan(TrainingPlan entity) {
		trainingPlanDao.save(entity);
	}
	
	public List<TrainingPlan> getTrainingPlans(Integer pageNumber,Integer pageSize,String courseId) {
		return trainingPlanDao.findTrainingPlans(pageNumber, pageSize, courseId);
	}
	
}
